package designMode.decoratorPattern;

/**
 * @ClassName Whip
 * @Description
 * @Author LIBOFEI
 * @Date 2020/6/15 16:43
 * @Version 1.0
 **/
public class Whip extends CondimentDecorator{
    Beverage beverage;
    public Whip(Beverage beverage){
        this.beverage = beverage;
    }

    @Override
    public String getDescription() {
        return beverage.getDescription() + ",Whip";
    }

    @Override
    public int getSize() {
        return beverage.getSize();
    }

    @Override
    public double cost() {
        return 18 + beverage.cost();
    }
}
